package ex.com.jm.food.entity;

import java.io.Serializable;
/**
 * 省份实体层
 * @author zhaojw
 *
 */



import java.util.HashSet;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
@Entity
@Table(name="jm_province")
public class Province implements Serializable {


	private static final long serialVersionUID = 1L;
	@Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    @Column(name="pro_id",nullable=false,unique=true,length=11)
	private int proId;
	@Column(name="pro_name",nullable=false,unique=true,length=32)
	private String proName;
	@OneToMany(mappedBy="proId",fetch=FetchType.EAGER)
	private Set<Citys> citys=new HashSet<Citys>();
	public int getProId() {
		return proId;
	}
	public void setProId(int proId) {
		this.proId = proId;
	}
	public String getProName() {
		return proName;
	}
	public void setProName(String proName) {
		this.proName = proName;
	}
	public Set<Citys> getCitys() {
		return citys;
	}
	public void setCitys(Set<Citys> citys) {
		this.citys = citys;
	}
}
